package com.ringtheweb.serviceprovider.weather.model;

public class Transition<E extends Enum<E>> {
	
	E _from;
	E _to;
	
	public Transition(E from,E to) {
		_from = from;
		_to = to;
	}
	
	public E getFrom() {
		return _from;
	}
	
	public E getTo() {
		return _to;
	}

	@Override
	public boolean equals(Object obj) {
		 if (! (obj instanceof Transition)) {
			return false;
		}
		Transition transtion = (Transition)obj;
		return getFrom().equals(transtion.getFrom()) && getTo().equals(transtion.getTo());
	}

	@Override
	public int hashCode() {
		int hashCode = 29;
		hashCode += getFrom().hashCode();
		hashCode = 29*hashCode + getTo().hashCode();
		return hashCode;
	}
	
	
	

}
